﻿namespace Point3DProgram
{
    using System;
    using System.Collections.Generic;
    using System.Text;

    public class Path
    {
        public Path()
        {
            this.List = new List<Point3D>();
        }

        public Path(List<Point3D> list)
        {
            this.List = list;
        }

        public List<Point3D> List { get; set; }

        public override string ToString()
        {
            StringBuilder point3DStringList = new StringBuilder();
            for (int p = 0; p < List.Count; p++)
            {
                point3DStringList.AppendLine(string.Format("Point {0} (x;y;z): {1}", p + 1, List[p].ToString()));
            }

            return point3DStringList.ToString();
        }

        public void Add(Point3D point3D)
        {
            this.List.Add(point3D);
        }

        public void Clear()
        {
            this.List.Clear();
        }
    }
}
